package day1;

import java.util.Arrays;

/**
 * @author oldliu
 * @since 1.0
 */
public class StrTest2 {
    public static void main(String[] args) {
        String str="大闸好，我是laoliu";
        byte[] bytes = str.getBytes();
        System.out.println(Arrays.toString(bytes));
        // byte 0111 1111
        // 100011111 0111111
        //补码，多字节表示法
        char[]c2=str.toCharArray();
        for(int i:c2)
            System.out.print(i+" ");
        System.out.println(">>>>>>>>>>>>>>>>>>>0");
        String s1="java";
        String s2="JAVA";
        System.out.println(s1.equals(s2));
        System.out.println(s1.equalsIgnoreCase(s2));
        System.out.println(str.length());
    }
}
